const Excel = require('exceljs');


// 创建一个新的工作簿
const workBook = new Excel.Workbook();

// 添加一个工作表
const workSheet = workBook.addWorksheet('Books');

// 添加表头
worksheet.columns = [
    { header: 'Title', key: 'title', width: 20 },
    { header: 'Author', key: 'author', width: 20 },
    { header: 'ISBN', key: 'isbn', width: 15 },
    { header: 'Publisher', key: 'publisher', width: 30 },
    { header: 'PublishDate', key: 'publishDate', width: 15 },
    { header: 'Category', key: 'category', width: 15 },
    { header: 'Stock', key: 'stock', width: 10 }
];
